package com.sc.utils;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.RandomAccessFile;

public class FileOperate {
	private RandomAccessFile rf;
	private String path;
	private File file;
	
	public FileOperate(String path) {
		this.path = path;
		ADLog.info("file path:"+path);
	}

	public void prepare() throws Exception {
/*		this.file = new File(path);
		if(!file.exists()) {
			this.file.createNewFile();
		}
		rf = new RandomAccessFile(file, "rw");*/
	}
	public void writelineToEnd(String line) throws Exception {
/*		rf.seek(rf.length());
		rf.writeBytes(line); 
		rf.writeBytes("\r\n");*/
	}

	public void finish() {
/*		try {
			rf.close();
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			try {
				if(rf != null)
					rf.close();   
            } catch (IOException e) {   
                e.printStackTrace();   
            } 
		}*/
	}
}
